﻿@model Lehnet.Models.Musteri
<html>
<head>
    <script type="text/javascript" src="/Scripts/jquery-1.4.4.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.unobtrusive-ajax.js"></script>
    <script>
        function CloseAndUpdate() {
            parent.getallMusteriAjax();
            parent.jQuery.fancybox.close();
        }
        function OnSuccess(result, status, xhr)
        {
            CloseAndUpdate();
        }
    </script>

</head>
<body>

    <div style="width: 100%; text-align: right;">
        <a href="#" title="Kapat" onclick="CloseAndUpdate()">
            <input type="button" value="Kapat" /></a>
    </div>
    @using (Ajax.BeginForm("Create", new AjaxOptions { OnSuccess = "OnSuccess", HttpMethod = "Post" }))
    {
        @Html.HiddenFor(model => model.Id)
        @Html.ValidationSummary(true)
        <h2>@ViewBag.ResultMessage</h2>
        <fieldset>
            <legend>Müşteri Tanımlama</legend>
            <table width="100%">
                <tr>
                    <td>Ad Soyad</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.Ad)</td>

                    <td></td>

                    <td>Ünvan</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.Unvan)</td>
                </tr>
                <tr>
                    <td>Adres</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.Adres)</td>

                    <td></td>

                    <td>Email Adresi</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.EMail1)</td>
                </tr>
                <tr>
                    <td>2. Email Adresi</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.EMail2)</td>

                    <td></td>

                    <td>Web Adresi</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.Web)</td>
                </tr>
                <tr>
                    <td>Vergi Dairesi</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.VergiDairesi)</td>

                    <td></td>

                    <td>Vergi No</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.VergiNo)</td>
                </tr>
                <tr>
                    <td>Açıklama</td>
                    <td>:</td>
                    <td colspan="4">@Html.TextAreaFor(model => model.Aciklama)</td>
                </tr>
                <tr>
                    <td colspan="6">
                        <input type="submit" value="Kaydet" /></td>

                </tr>
            </table>
        </fieldset>
    }
</body>

</html>
